﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace CourseSystem.Common.Models
{
    public class PassModel
    {
        [Required(ErrorMessage = "必须填写")]
        [DataType(DataType.Password)]
        [DisplayName("原密码")]
        public string OldPassword { get; set; }

        [Required(ErrorMessage = "必须填写")]
        [StringLength(20, MinimumLength = 6, ErrorMessage = "请输入6-20个字符")]
        [DataType(DataType.Password)]
        [DisplayName("新密码")]
        public string Password { get; set; }

        [Required(ErrorMessage = "必须填写")]
        [StringLength(20, MinimumLength = 6, ErrorMessage = "请输入6-20个字符")]
        [DataType(DataType.Password)]
        [DisplayName("重复密码")]
        public string PasswordRe { get; set; }
    }
}